-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
refactor(IShare): Add typing for IShare #57575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
c63846f to
7ae0c6f
Compare
7ae0c6f to
c9ff2e8
Compare
98b5b77 to
8b6715c
Compare
This might also improve a bit the performance. Signed-off-by: Carl Schwan <carlschwan@kde.org>
8b6715c to
cec0a3b
Compare
artonge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For v34?
Yeah feels tiny to risky to do that in 33. Not worth the tiny performance improvements |
| try { | ||
| $share->getId(); | ||
| $this->fail(); | ||
| } catch (LogicException $e) { | ||
| // object is expected to not have been created | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also assert that the exception is thrown ($this->expectException).
| if ($this->id === null) { | ||
| throw new \LogicException('Share id is null'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might break apps. IIRC I tried to add typing to IShare once and some apps rely on getting null back.
Summary
This might also improve a bit the performance as we are spending 2-3% of CPU time in
IShare::setIdTODO
Checklist
3. to review, feature component)stable32)